home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20020314-20021006
/
000165_stephen@inisan…actrix.gen.nz.x_Fri Jun 21 14:09:55 EDT 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
4KB
|
114 lines
Article: 13469 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-feed.news.verio.net!ord-feed.news.verio.net!stl-feed.news.verio.net!news.cc.ukans.edu!logbridge.uoregon.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!news.actrix.gen.nz!inisant.jsw.gen.nz!127.0.0.1
From: stephen@inisant.actrix.gen.nz.x (Stephen Worthington)
Message-ID: <mGKLjqv1fPVx-pn2-dLJvrE4bbu5F@inisant.jsw.gen.nz>
Newsgroups: comp.protocols.kermit.misc
Subject: Script dropping out to command prompt
User-Agent: ProNews/2 V1.51.ib110
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
X-Original-NNTP-Posting-Host: 127.0.0.1
X-Original-Trace: 22 Jun 2002 05:40:17 +1200, 127.0.0.1
Lines: 91
X-Original-NNTP-Posting-Host: 203.96.55.3
Date: 22 Jun 2002 05:40:17 +1200
NNTP-Posting-Host: 203.96.16.33
X-Complaints-To: abuse@tsnz.net
X-Trace: news02.tsnz.net 1024681220 203.96.16.33 (Sat, 22 Jun 2002 05:40:20 NZST)
NNTP-Posting-Date: Sat, 22 Jun 2002 05:40:20 NZST
Organization: TelstraClear
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13469
I am trying to write a script to automate changing some settings on my
Cisco 827 router via a telnet connection. I am using Kermit 1.1.20
for
OS/2. This is my first attempt a real Kermit script, so please let me
know if I am doing stupid things :-)
When I run the script, at a certain point I get dropped out of the
script
to a Kermit command prompt. Doing an Alt-X from there causes the
script
to continue to completion. What I do not understand is what causes
Kermit
to go to a command prompt. I can see nothing different at that point
in
the script, or in the interaction with the router.
This is the script at present:
======================================================================
==
take {E:\U\K2\SCRIPTS\router_1.ksc}
if fail end 1 {router login failed}
lineout conf t
input 20 {router(config)#}
if fail end 1 {conf t failed (1)}
set input timeout-action proceed
lineout no ip inspect name DIALER-CBAC smtp
input 50 {router(config)#}
if fail end 1 {conf t failed (2)}
clear input
lineout exit
set input timeout-action proceed
set exit on-disconnect off
input 60 {router#}
xif fail {
echo failed
echo "\v(input)"
end 1
}
echo succeeded
lineout exit
end 0
======================================================================
==
The router_1.ksc script called at the start is a slight variation on
the
standard login.ksc script that logs in to the router. It works
without
problems. This is what I see when I run the script:
======================================================================
==
User Access Verification
Password:
router>enable
Password:
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#no ip inspect name DIALER-CBAC smtp
%entry not found
router(config)#exit
router#succeeded
Kermit 95 1.1.20, 31 Mar 2000, for 32-bit OS/2
Copyright (C) 1985, 2000,
Trustees of Columbia University in the City of New York.
Registered to:
J S Worthington
Serial number: K95-00007210131-1.1
Type ? or HELP for help.
[E:\U\K2\] K-95>
======================================================================
==
The final "lineout exit" line is not executed until I do Alt-X, but
the
previous "echo succeeded" line works as "succeeded" is seen in the
output
just before the command line appears.
So what have I missed here?
--
Anti-spam: Remove the .x to reply